package socket;

import java.io.BufferedReader;  
import java.io.InputStreamReader;  
import java.io.PrintWriter;  
import java.net.InetAddress;  
import java.net.Socket;

import Static.StaticTest;  
  
public class MyClient2 {  
    static Socket server;  
  
    public static void main(String[] args) throws Exception {  
          sockets();
    }  
    
    public static void sockets() throws Exception{
    	server = new Socket(InetAddress.getLocalHost(), 5679);  
        BufferedReader in = new BufferedReader(new InputStreamReader(  
                server.getInputStream()));  
        PrintWriter out = new PrintWriter(server.getOutputStream());  
        BufferedReader wt = new BufferedReader(new InputStreamReader(System.in));  
        while (true) {  
            String str = wt.readLine();  
            out.println("client:"+str);  
            out.flush();  
            if (str.equals("end")) {  
                break;  
            }  
            System.out.println("clientsys:");  
            System.out.println("clientsys:"+in.readLine());  
            System.out.println("static:"+StaticTest.a);  
        }  
        server.close();
    }
}  
